package com.tn.controller.alarm.common.enums;

/**
 * @ClassName ActTypeEnum
 * @Description TODO
 * @Author Yezhongzhu
 * @Date 2021/12/31 9:25
 * @Version v1.0
 **/
public enum ActTypeEnum {
    LOGIN("login"),//登录
    SYNC_SETTING("sync_setting"),//同步配置
    HEARTBEAT("heartbeat"),//心跳检测
    RETURN_BACK("return_back"),//归还电池消息
    SYNC_BATTERY("sync_battery"),//同步电池消息
    POPUP_CONFIRM("popup_confirm"),//手动全部弹电池
    RENT_CONFIRM("rent_confirm");//请求借电池

    private String type;

    ActTypeEnum(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public static ActTypeEnum getByCode(String type){
        for (ActTypeEnum actTypeEnum:ActTypeEnum.values()){
            if(actTypeEnum.type.equals(type)){
                return actTypeEnum;
            }
        }
        return null;
    }
}
